<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
  	<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  	<title>Vail Systems</title>
  	<%= stylesheet_link_tag 'css_reset', 'vail' %>
		<%= javascript_include_tag :defaults %>
		
	</head>

	<body>
		<div id="wrapper">
			
			<div id="header">
				<ul id="login">
					<% if logged_in? %>
						<li class="horizontal">
							Hello, <%= User.find(session[:user]).login %>!
						</li>
						<li class="horizontal">|</li>
						<li class="horizontal"><%= link_to "log out", logout_path %></li>
					<% else %>
						<li class="horizontal"><%= link_to "log in", login_path %></li>
					<% end %>
					<li class="horizontal">|</li>	
					<li class="horizontal"><%= link_to "company", :controller => :company %></li>
					<li class="horizontal">|</li>	
					<li class="horizontal"><%= link_to "contact us", :controller => :contact_us %></li>
				</ul>
				<ul id="nav">
					<% Category.home_page.each do |link| %>
						<li class="horizontal">
							<%= link_to link.menu_name, category_path(link) %>
						</li>
						<% unless Category.home_page.index(link) == Category.home_page.length - 1  %>
							<li>|</li>
						<% end %>
					<% end %>
				</ul>
				<div id="logo">
					<%= link_to image_tag("/images/logo.gif"), "/"%>
				</div>
			</div> <!-- END header -->
			
			<div id="main">
				<% if flash[:notice] %>
					<div id="border_top"></div>
					<div id="notice">
						<h1><%= flash[:notice] %></h1>
					</div>
					<div id="border_bottom"></div>
				<% end %>				
				<%= yield  %>
			</div> <!-- END main -->
			
			<div id="footer">
				<div id="cp_notice">
					Copyright Vail Systems, Inc. 1999 - 2007. All Rights Reserved.
				</div>
				<ul id="info">
					<li class="horizontal"><%= link_to "privacy policy", :controller => :privacy_policy %></li>
					<li class="horizontal">|</li>
					<li class="horizontal"><%= link_to "terms of use", :controller => :terms_of_use %></li>
					<li class="horizontal">|</li>
					<li class="horizontal"><%= link_to "datasheets", :controller => :datasheets %></li>
					<li class="horizontal">|</li>
					<li class="horizontal"><%= link_to "myVail", "https://www.vailsys.com/cgi-bin/login.cgi" %></li>
				</ul>
			</div> <!-- END footer -->
	
		</div> <!-- END wrapper -->
		
		<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
		</script>
		<script type="text/javascript">
		_uacct = "UA-2341791-1";
		urchinTracker();
		</script>
	</body>
</html>